
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@taglib prefix="mvc" uri="http://www.springframework.org/tags/form" %>
<%@taglib prefix="fmt" uri="http://www.springframework.org/tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title><fmt:message code="email.title.inbox" /></title><!-- 收件箱 -->
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
    <%--<link rel="stylesheet" type="text/css" href="../lib/pagination/style/pagination.css"/>--%>
    <link rel="stylesheet" type="text/css" href="/css/main/theme3/fontawesome5.min.css"/>
    <link rel="stylesheet" type="text/css" href="/css/email/inbox.css"/>
    <link rel="stylesheet" type="text/css" href="/css/email/inbox-upright.css"/>
    <link rel="stylesheet" type="text/css" href="/css/commonTheme/${sessionScope.InterfaceModel}/commonTheme.css"/>
    <script src="/js/common/language.js"></script>
    <script src="../js/jquery/jquery-1.9.1.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="../js/jquery/jquery.cookie.js"></script>
    <script src="/lib/jQuery-File-Upload-master/jquery.ui.widget.js" type="text/javascript" charset="utf-8"></script>
    <script src="/lib/jQuery-File-Upload-master/jquery.iframe-transport.js" type="text/javascript" charset="utf-8"></script>
    <script src="/lib/jQuery-File-Upload-master/jquery.fileupload.js" type="text/javascript" charset="utf-8"></script>
    <script src="/js/webOffice/fileShow.js" type="text/javascript" charset="utf-8"></script>

    <script src="../lib/ueditor/ueditor.config.js" type="text/javascript" charset="utf-8"></script>
    <script src="../lib/ueditor/ueditor.all.js" type="text/javascript" charset="utf-8"></script>
    <script src="/lib/ueditor/UEcontroller.js" type="text/javascript" charset="utf-8"></script>
    <%--<script src="../lib/laydate.js" type="text/javascript" charset="utf-8"></script>--%>

    <script src="../js/base/base.js?20201110.2" type="text/javascript" charset="utf-8"></script>
    <script src="/js/ajaxupload.js" type="text/javascript" charset="utf-8"></script>
    <%--<script src="/lib/jquery.form.min.js"></script>--%>
    <script src="../js/jquery/jquery.cookie.js" type="text/javascript" charset="utf-8"></script>
    <%--<script src="../lib/pagination/js/jquery.pagination.min.js" type="text/javascript" charset="utf-8"></script>--%>

    <script type="text/javascript" src="/js/common/fileupload.js"></script>

    <style>
        body{
            background-color:#fff;
        }
        .drafts {
            margin: 0;
            font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
            font-size: 14px;
            line-height: 20px;
            color: #333333;
            background-color: #ffffff;
        }

        input,
        button,
        select,
        textarea {
            font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
        }
        input[type="radio"], input[type="checkbox"] {
            margin: 4px 0 0;
            margin-top: 1px \9;
            *margin-top: 0;
            line-height: normal;
        }
        select, textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input {
            display: inline-block;
            height: 20px;
            padding: 4px 6px;
            margin-bottom: 10px;
            font-size: 14px;
            line-height: 20px;
            color: #555555;
            vertical-align: middle;
            -webkit-border-radius: 4px;
            -moz-border-radius: 4px;
            border-radius: 4px;
        }
        a {
            text-decoration: none;
            color: #207BD6;
            cursor: pointer;
        }
        a:hover {
            color: #3b8eef;
        }
        .main_left .BTN:hover{background:#e8f4fc;}
        .attachment a{text-decoration: none;}
        .attachment a img{vertical-align: middle;width: 14px;}
        .searchTxt{width:70%;height:30px;padding-left:5px;margin-bottom:5px;}
        .UP_INBOX .tab table .Hover:hover{background-color:#e8f4fc;}
        .Hover img{width:16px;}
        .on_tr{background-color: #e8f4fc !important;}
        .UP_INBOX,.UP_INBOX .tab,.UP_INBOX .tab table{width: 99%;}
        .UP_INBOX .tab table tr{border: 1px solid #c0c0c0;}
        .UP_INBOX .tab table tr th{color: #2F5C8F;font-weight: normal;}
        .UP_INBOX .tab table tr:nth-child(odd){background-color: #fff;}
        .UP_INBOX .tab table tr:nth-child(even){background-color: #F6F7F9;}
        .UP_INBOX .tab table tr th,.UP_INBOX .tab table tr td{padding:10px;}
        .UP_INBOX,.UP_INBOX .tab,.UP_INBOX .tab table tr th.theme{text-align: center}
        .UP_INBOX .tab table .theme_a a{text-decoration: none;text-align: left;display: block;color:#2B7FE0;}
        .M-box3{margin-top:10px;float:right;margin-right: 7px;}
        .M-box3 a{margin: 0 3px;width: 29px;height: 29px;line-height: 29px;font-size: 12px;text-decoration: none;}
        .M-box3 .active{margin: 0px 3px;width: 29px;height: 29px;line-height: 29px;background: #2b7fe0;font-size: 12px;border: 1px solid #2b7fe0;}
        .jump-ipt{margin: 0 3px;width: 29px;height: 29px;line-height: 29px;font-size: 12px;}
        .M-box3 a:hover{background: #2b7fe0;}
        .set_up_ul{font-size: 14px;border: #ccc 1px solid;border-radius: 5px;width: 80%;background-color: #fff;position: absolute;bottom: 42px;margin-left: 5px}
        .set_up_ul ul{list-style: none;}
        .set_up_ul ul li{width: 100%;text-align: center;color: #000;height:25px;line-height:25px;}
        .set_up_ul ul li:hover{background-color: #6ea1d5;color:#fff;cursor: pointer;}
        .RemoveTo_div{font-size: 12px;border: #ccc 1px solid;border-radius: 5px;min-width:160px;background-color: #fff;position: absolute;left:0px;top: 30px;z-index: 9999;}
        .RemoveTo_div ul li{padding: 5px 10px;display:block;clear: both;}
        .RemoveTo_div .RemoveTo_child:hover{background-color: #6ea1d5;color:#fff;cursor: pointer;}
        .allEmail_div{font-size: 12px;border: #ccc 1px solid;border-radius: 5px;min-width:150px;background-color: #fff;position: absolute;left: 18.3%;top: 52px;z-index: 9999;}
        .allEmail_div ul li{padding: 5px 10px;display:block;clear: both;}
        .allEmail_div ul li:hover{background-color: #6ea1d5;color:#fff;cursor: pointer;}
        textarea{width: 230px;height: 50px;margin: 5px;}
        .noEmail_img{width: 163px;height: 162px;margin: 170px auto;}
        .noContent{width: 100px;text-align:center;margin: 200px auto;}
        .main_right #TAB tr td>span>span{
            float: left;
        }
        .page .page_left .write .d_im{
            background: url(../../img/email/icon_normal_01.png) no-repeat;
            background-size:100% 100%;
        }
        .main .main_left ul li .xia img{
            float: none;
            position: absolute;
            margin-right: 0;
            right: 8%;
        }
        .inbox_btn_tim{
            height: 52px;
        }
        .page .page_left .inbox_btn{
            height: 52px;
            line-height: 52px;
        }
        img[src=""],img:not([src]){opacity:0;}
        .up_page_right{overflow-y: hidden}
        input{background:none}
        .ul_showtwo{
            background: #6596c8;
        }
        .divUlShow{
            background: #6596c8;
        }
        .div_down{
            background: url(/img/icon_more_dakai_07.png) no-repeat 75% center;
        }
        .main_middle{
            position: absolute;
            float: left;
            width: 8px;
            height: 100%;
            background: #cee7ff;
            left:28%;
            cursor: col-resize;
            z-index: 10;
        }
        #divTbaleText{
            border-collapse: collapse;
        }
        #divTbaleText tr{
            border:#ccc 1px solid;
        }
        #divTbaleText tr th{
            padding: 5px;
        }
        #divTbaleText tr td{
            padding: 5px;
        }
        .befor{
            display: block;
            height: 100%;
            overflow-y: auto;
        }
        #main_div_right {
            scrollbar-width: none;
        }
        #main_div_right::-webkit-scrollbar {
            width: 0px;
        }

        #befor::-webkit-scrollbar{
            width: 0px;
        }
        #befor{
            scrollbar-width: thin;
            scrollbar-color: #cdcdcd #f0f0f0;
        }
        /*定义滚动条高宽及背景
        高宽分别对应横竖滚动条的尺寸*/
        #befor::-webkit-scrollbar
        {
            width:8px;
            height:8px;
            background-color:rgba(0,0,0,.05);
            border-radius:10px;
        }
        /*定义滑块
        内阴影+圆角*/
        #befor::-webkit-scrollbar-thumb
        {
            border-radius:10px;
            background-color:rgba(0,0,0,.1);
        }
        .main .main_left{
            overflow: hidden;
        }
        .opeartion{
            border-bottom: #eee 1px solid;
        }
        .main_div_right{
            overflow: hidden;
        }
        .main_right .article{
            margin-top: 20px;
            padding-left: 1%;
            border-top: #ebebeb 1px solid;
            /*overflow-y: auto;*/
        }
        .main_right .article p{
            word-wrap: break-word;
        }
        .drafts {
            position: relative;
            overflow: hidden;
        }
        .drafts {
            position: absolute; left: 0;
            overflow-x: hidden;
            overflow-y: scroll;
        }
        .drafts .edui-default .edui-editor {
            border: 0;
        }

        /* for Chrome */
        .drafts::-webkit-scrollbar {
            display: none;
        }
        .bar {
            height: 18px;
            background: green;
        }
        .hoverbox {
            position: absolute;
            background: #fff;
            right: -45px;
            width: 60px;
            z-index: 1001;
            top: 0;
            height: auto;
            padding: 2px 0;
            margin: 2px 0 0;
            list-style: none;
            background-color: #ffffff;
            border: 1px solid #ccc;
            border: 1px solid rgba(0,0,0,0.2);
            border-right-width: 2px;
            border-bottom-width: 2px;
            -webkit-border-radius: 6px;
            -moz-border-radius: 6px;
            border-radius: 6px;
            -webkit-box-shadow: 0 5px 10px rgba(0,0,0,0.2);
            -moz-box-shadow: 0 5px 10px rgba(0,0,0,0.2);
            box-shadow: 0 5px 10px rgba(0,0,0,0.2);
            -webkit-background-clip: padding-box;
            -moz-background-clip: padding;
            background-clip: padding-box;
            display: none;
        }
        .hoverbox li {
            font-size: 9pt;
            cursor: pointer;
            color: #333333;
            padding: 0 5px;
        }
        .hoverbox li:hover{
            background-color: #0081c2;
            color: #fff;
        }
        #senduser{
            min-width: 70%;
            vertical-align: middle;
            cursor: not-allowed;
            background-color: #eeeeee;
            border: 1px solid #cccccc;
            box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
            border-radius: 4px;
            margin: 0;
            padding: 4px 6px;
        }
        .add_img a {
            color: #207BD6;
            margin-left: 16px;
        }
        .addPepl{
            font-size: 14px;
            position: relative;
            margin-bottom: 12px;
        }
        .addPepl a {
            color: #207BD6;
            text-decoration: none;
            margin-left: 12px;
        }
        .files a:hover,
        .add_img a:hover,
        .addPepl a:hover {
            color: #0457b9;
        }
        .inPole{
            font-size: 14px;
        }
        #txt{
            width: 70%;
            background-color: #ffffff;
            border: 1px solid #cccccc;
            -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
            -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
            box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
            -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
            -moz-transition: border linear 0.2s, box-shadow linear 0.2s;
            -o-transition: border linear 0.2s, box-shadow linear 0.2s;
            transition: border linear 0.2s, box-shadow linear 0.2s;
            outline: none;
            margin: 5px 5px;
        }
        .Color a {
            text-decoration: none;
            color: #207BD6;
        }
        .files {
            padding: 5px;
        }
        .files a {
            cursor: pointer;
            text-decoration: none;
            /*position: relative;*/
            z-index: 2;
        }
        .files #uploadimg::before {
            content: "\f093";
            margin-right: 4px;
            font-family: "Font Awesome 5 Pro";
            font-weight: 300;
        }
        .files #uploadimg img {
            display: none;
        }

        #files_txt a img {
            display: none;
        }
        #files_txt a::before {
            content: "\f0c6";
            font-size: 11px;
            color: #2b7fe0;
            margin-left: 7px;
            font-family: "Font Awesome 5 pro";
            display: inline-block;
            font-variant: normal;
            font-style: normal;
            font-weight: 300;
            line-height: 1px;
            margin-right: 4px;
        }

        #files_txt .deImgs {
            position: relative;
            top: 2px;
        }

        form {
            margin: 0 0 20px;
        }
        table tr td:first-of-type {
            padding-left: 10px;
        }
        table tr.Attachment td {
           <!-- padding: 6px 0;-->
        }
        p {
            margin: 0 0 10px;
        }
        #copeNameText,
        #secritText,
        #senduser,
        #txt {
            margin: 12px 0 12px 12px;
        }
        #secritText,
        #copeNameText {
            min-width: 70%;
        }
        .remind,
        .files {
            padding: 12px;
        }
        .div_btn {
            margin-top: 12px;
            margin-bottom: 12px;
            width: 340px;
        }
        .main .main_right {
            padding-left: 12px;
        }
        .main_right.drafts table {
            border-left: 1px solid #d4d4d4;
            border-top: 1px solid #d4d4d4;
        }
        .main_right.drafts table tr {
            border-top: 1px solid #d4d4d4;
        }
        .main_right.drafts table td {
            border-right: 1px solid #d4d4d4;
            border-bottom: 1px solid #d4d4d4;
        }
        .edui-default table.edui-default,
        .edui-default table.edui-default tr,
        .edui-default table.edui-default td {
            border: 0;
        }
        .edui-default table.edui-default td {
            border-top: 1px solid #d4d4d4;
        }
        #edui1_wordcount {
            padding-top: 6px;
            padding-bottom: 6px;
        }
        .div_btn .sureBtn::before {
            content: "\f1d8";
            font-size: 12px;
            margin-right: 4px;
        }
        .div_btn .saveBtn::before {
            content: "\f0c7";
            font-size: 12px;
            margin-right: 4px;
        }
        .div_btn .sureBtn::before, .div_btn .saveBtn::before, #uploadimg::before {
            font-family: "Font Awesome 5 Pro";
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            display: inline-block;
            font-style: normal;
            font-variant: normal;
            font-weight: 300;
            line-height: 1;
        }
        .div_btn .sureBtn,
        .div_btn .saveBtn {
            font-size: 10pt;
            float: left;
            margin-right: 10px;
            margin-left: 10px;
            height: 28px;
            line-height: 28px;
            cursor: pointer;
            color: #fff;
            background-color: #2b7edf;
            background-image: none;
            border-radius: 6px;
            text-align: center;
        }
        .div_btn .sureBtn:hover,
        .div_btn .saveBtn:hover {
            background-color: #3b8eef;
        }
        .edui-for-justifyjustify + .edui-separator,
        .edui-for-tolowercase + .edui-separator,
        .edui-for-anchor + .edui-separator,
        .edui-for-imagecenter + .edui-separator,
        .edui-for-background + .edui-separator,
        .edui-for-wordimage + .edui-separator,
        .edui-for-charts + .edui-separator,
        .edui-for-wordimport + .edui-separator,
        div.edui-box.edui-for-touppercase,
        div.edui-box.edui-for-tolowercase,
        div.edui-box.edui-for-link,
        div.edui-box.edui-for-unlink,
        div.edui-box.edui-for-anchor,
        div.edui-box.edui-for-imagenone,
        div.edui-box.edui-for-imageleft,
        div.edui-box.edui-for-imageright,
        div.edui-box.edui-for-imagecenter,
        div.edui-box.edui-for-simpleupload,
        div.edui-box.edui-for-insertimage,
        div.edui-box.edui-for-emotion,
        div.edui-box.edui-for-scrawl,
        div.edui-box.edui-for-insertvideo,
        div.edui-box.edui-for-music,
        div.edui-box.edui-for-attachment,
        div.edui-box.edui-for-map,
        div.edui-box.edui-for-gmap,
        div.edui-box.edui-for-insertframe,
        div.edui-box.edui-for-insertcode,
        div.edui-box.edui-for-webapp,
        div.edui-box.edui-for-pagebreak,
        div.edui-box.edui-for-template,
        div.edui-box.edui-for-background,
        div.edui-box.edui-for-horizontal,
        div.edui-box.edui-for-date,
        div.edui-box.edui-for-time,
        div.edui-box.edui-for-spechars,
        div.edui-box.edui-for-snapscreen,
        div.edui-box.edui-for-wordimage,
        div.edui-box.edui-for-inserttable,
        div.edui-box.edui-for-deletetable,
        div.edui-box.edui-for-insertparagraphbeforetable,
        div.edui-box.edui-for-insertrow,
        div.edui-box.edui-for-deleterow,
        div.edui-box.edui-for-insertcol,
        div.edui-box.edui-for-deletecol,
        div.edui-box.edui-for-mergecells,
        div.edui-box.edui-for-mergeright,
        div.edui-box.edui-for-mergedown,
        div.edui-box.edui-for-splittocells,
        div.edui-box.edui-for-splittorows,
        div.edui-box.edui-for-splittocols,
        div.edui-box.edui-for-charts,
        div.edui-box.edui-for-print,
        div.edui-box.edui-for-preview,
        div.edui-box.edui-for-searchreplace,
        div.edui-box.edui-for-help,
        div.edui-box.edui-for-drafts,
        div.edui-box.edui-for-wordimport {
            display: none !important;
        }
        #TAB,#getUser{

            color: #000;
        }
		table tr td{
		 padding:0 8px 15px!important;
		}
		#befor li .time{
		margin:10px 0 0 0;
		}
    </style>
    <link rel="stylesheet" type="text/css" href="/css/email/emailList.css"/>
</head>
<body>
<div class="page" style="margin:0px">
    <div class="main" style="display: block;position: relative;width:100%;">
        <div class="main_left" style="position: relative;border-right: none;left: 0px;height: 100%;">
            <div class="opeartion">
                <div class="sort" style="margin: 5px 0;width:100%">
                    <%-- <span class="Search fa fa-search color1" title='<fmt:message code="workflow.th.sousuo" />' ></span>搜索--%>
                    <%--  <span class="ReFresh fa fa-redo-alt color2" title='<fmt:message code="global.lang.refresh" />' ></span>刷新--%>
                    <span style="display:none"  class="signReaders fa fa-check-square color3" title='<fmt:message code="main.th.taggedRead"/>' ></span><%--标记已读--%>
                    <!--<span style="display:none" class="selectReaders fa fa-clone color4" title='一键全选' ><span class="fa fa-check"></span></span>--><%--标记已读--%>
                    <input  class="selectReaders fa " style="margin: 5px 0px 0 17px;float:left;" title='一键全选' type="checkbox">

                    <div style="float:left;margin-left:45px;font-size:12px;" id="username">用户名/标题</div>
                        <%--  begin 给邮件增加按钮实现伸缩功能 --%>
                    	<%--  update by cyx at 2021-07-29--%>
					    <button onclick="sousuocxx()" style="float:right;margin-right:10px;font-size:12px;" class="sousuox"><</button>
						<button onclick="sousuocyx()" style="float:right;margin-right:10px;font-size:12px;display:none;" class="sousuoy">></button>
                    <div  style="float:right;margin-right:40px;font-size:12px;" id="date">日期</div>

                </div>
                <!--<div class="sort_right">
                    <img src="/img/commonTheme/${sessionScope.InterfaceModel}/icon_shaixuan_03.png"/><fmt:message code="email.th.order" />
                </div>-->
                <div style="clear: both"></div>
                <div style="display:none;" class="search_div">
                    <input type="text" name="text" class="searchTxt" placeholder="<fmt:message code="main.th.ContentSearch" />"><span class="cancleSpan"><fmt:message code="depatement.th.quxiao" /></span>
                </div>
                <!--<div class="signDiv" style="display: none;">
                    <ul id="orderByName">
                        <li orderByName="2"><fmt:message code="global.lang.date" /></li>
                        <li orderByName="3"><fmt:message code="email.th.sender" /></li>
                        <li orderByName="4"><fmt:message code="main.th.ReadNot" /></li>
                        <li orderByName="5"><fmt:message code="main.th.Star" /></li>
                        <li orderByName="6"><fmt:message code="email.th.file" /></li>
                    </ul>
                    <ul id="orderWhere">
                        <li orderWhere="0" style="border-top:#ccc 1px solid;"><fmt:message code="netdisk.th.asc" /></li>
                        <li orderWhere="1"><fmt:message code="netdisk.th.desc" /></li>
                    </ul>
                </div>-->
            </div>
            <ul style="display: block;" class="befor" id="befor">

            </ul>
            <div class="noContent" style="display: none;"><span><fmt:message code="Email.th.noNote" /></span></div>
        </div>
        <div class="main_middle" style="height: 100%;"></div>
        <div class="main_div_right" id="main_div_right" style="width: 72%;float: left;overflow-y: auto;overflow-x: auto;">
            <%--没有邮件显示--%>
            <div class="main_right noEmail" style="display: none;">
                <div class="noEmail_img">
                    <img src="../img/img_nomessage_03.png" alt='<fmt:message code="main.th.emptyInbox" />'><%--空收件箱--%>
                </div>
            </div>
            <!-- 收件箱 -->
            <div class="main_right detailes" style="display: block;height: 100%;">
                <div class="getUser" id="getUser" style="display: block;">
                    <span class="span_hr" style="display:none">
                        <div class="attrImg" ><img src=""/></div>
                        <p><span></span>&nbsp;&nbsp;<span class="zong"></span></p>
                        <p class="userdept"></p>
                    </span>
                </div>
                <table id="TAB" cellspacing="0" cellpadding="0" style="border-collapse:collapse;table-layout: fixed; ">

                </table>
                <div class="article" style="">

                </div>
            </div>
            <div class="main_right drafts" style="display: none;height: 100%;overflow-y: auto;">
                <table cellspacing="0" cellpadding="0" style="margin-bottom: 10px;margin-right: 11px;">
                    <tr class="append_tr">
                        <td width="15%" height="47" style="line-height:47px;text-indent:2px"><fmt:message code="email.th.recipients" />  ：</td>
                        <td width="84%" style="line-height:47px;" height="47">
                            <div class="inPole">
                                <textarea name="txt" id="senduser" user_id='' value="" disabled style="width: 230px;height: 50px;"></textarea>
                                <span class="add_img">
												<a href="javascript:;" id="selectUser" class="Add"><fmt:message code="global.lang.add" /></a>
											</span>
                                <span class="add_img">
												<a href="javascript:;" class="clear"><fmt:message code="notice.th.delete1" /></a>
											</span>

                            </div>
                            <div class="addPepl">
                                <a href="javascript:;" class="a1"><fmt:message code="email.th.addwait" /></a>
                                <a href="javascript:;" class="a2" style="display:none"><fmt:message code="email.th.addbcc" /></a>

                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td style="line-height:40px;" height="40px"><fmt:message code="email.th.major" />：</td>
                        <td style="line-height:40px;" height="40px">
                            <input style="text-align: left;" type="text" id="txt" value="" class="input_txt" />
                        </td>
                    </tr>
                    <tr>
                        <td width="15%" style="line-height:40px;" height="40px">
                            <p><fmt:message code="email.th.content" />：</p>
                            <p class="Color"><a href="javascript:;" onclick="empty()">
							<fmt:message code="global.lang.empty" /></a></p>
                        </td>
                        <td width="84%" style="line-height:40px;" height="40px">
                            <div id="container" style="width: 99.9%;min-height: 200px;display:inline" name="content" type="text/plain"></div>
                        </td>
                    </tr>

                    <tr class="Attachment" style="width:100%;">
                        <td width="10%" style="line-height:40px;" height="40px"><fmt:message code="email.th.file" />：</td>
                        <td width="89%"   class="files" id="files_txt" style="line-height:40px;" height="40px">
                            <div id="fileContent"></div>
                        </td>
                    </tr>
                    <tr>
                        <td><fmt:message code="email.th.filechose" />：</td>
                        <td class="files">
                            <form id="uploadimgform" target="uploadiframe"  action="/upload?module=email"  method="post" >
                                <input type="file" multiple="multiple" name="file"  id="uploadinputimg"  class="w-icon5" style="position: absolute;opacity: 0;width: 70px;filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0)">
                                <a href="#" id="uploadimg"><img style="margin-right:5px;" src="../img/icon_uplod.png"/><fmt:message code="global.th.fileup" /></a>
                            </form>
                            <div id="progress" style="width: 200px;float: left;margin-left: 10px;margin-top: 2px;">
                                <div class="bar" style="width: 0%;"></div>
                            </div>
                            <div class="barText" style="float: left;margin-left: 10px;"></div>
                        </td>
                    </tr>
                    <tr>
                        <td width="15%" style="padding-left: 10px;">提醒：</td>
                        <td width="85%" class="remind">
                            <div class="news_t">
                                <input type="checkbox" name="remind" class="remindCheck" value="0" checked>
                                <span class="remind_msg">发送事务提醒消息</span>&nbsp;
                                
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <div class="div_btn">
                                <div class="sureBtn" id="btn1"><span ><fmt:message code="email.th.transmitimmediate" /></span></div>
                                <div class="saveBtn" id="btn2"><span ><fmt:message code="email.th.savedraftbox" /></span></div>
                                <!--<input type="button" id="btn1" style="cursor: pointer;width: 70px;border-radius: 5px;height: 30px;line-height: 30px;color: #000;" value="<fmt:message code="email.th.transmitimmediate" />" />
                                        	<input type="button" id="btn2" style="cursor: pointer;width: 90px;border-radius: 5px;height: 30px;line-height: 30px;color: #000;" value="<fmt:message code="email.th.savedraftbox" />" />-->
                            </div>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
</div>
</body>

<script src="../js/webOffice/fileShow.js?20201110.1" type="text/javascript" charset="utf-8"></script>
<script src="../js/attachment/attachView.js?20201013.1" type="text/javascript" charset="utf-8"></script>
<script src="../lib/layer/layer.js?20201106" type="text/javascript" charset="utf-8"></script>
<script src="../js/email/emailList.js?20201111.2" type="text/javascript" charset="utf-8"></script>

<script type="text/javascript">
    $(function () {
        $(".opeartion .sort .fa:eq(0)").hover(function () {
            $(this).toggleClass(".color1",".color01")
        },function () {
            $(this).toggleClass(".color1",".color01")
        })
        $(".opeartion .sort .fa:eq(1)").hover(function () {
            $(this).toggleClass(".color2",".color02")
        },function () {
            $(this).toggleClass(".color2",".color02")
        })
        $(".opeartion .sort .fa:eq(2)").hover(function () {
            $(this).toggleClass(".color3",".color03")
        },function () {
            $(this).toggleClass(".color3",".color03")
        })
        $(".opeartion .sort .fa:eq(3)").hover(function () {
            $(this).toggleClass(".color4",".color04")
        },function () {
            $(this).toggleClass(".color4",".color04")
        })
    })
    $(function () {
        $(".opeartion .sort .Search").hover(function () {

            $(this).toggleClass("color01")
        },function () {
            $(this).toggleClass("color01")
        })
        $(".opeartion .sort .ReFresh").hover(function () {
            $(this).toggleClass("color02")
        },function () {
            $(this).toggleClass("color02")
        })
        $(".opeartion .sort .signReaders").hover(function () {
            $(this).toggleClass("color03")
        },function () {
            $(this).toggleClass("color03")
        })
        $(".opeartion .sort .selectReaders").hover(function () {
            $(this).toggleClass("color04")
        },function () {
            $(this).toggleClass("color04")
        })
    })

    //				查Internet邮箱
    $.ajax({
        type:'get',
        url:'/email/selectUserWebMail',
        dataType:'json',
        success:function (res) {
            var data=res.obj;
            var str='';
            if(res.flag){
                if(data.length > 0){
                    for(var i=0;i<data.length;i++){
                        str+='<option value="'+data[i].email+'">'+data[i].email+'</option>'
                    }
                }
                $('#outSelect').html(str);
            }
        }
    })
    function autodivheight(){
        var winHeight=0;
        if (window.innerHeight)
            winHeight = window.innerHeight;
        else if ((document.body) && (document.body.clientHeight))
            winHeight = document.body.clientHeight;
        if (document.documentElement && document.documentElement.clientHeight)
            winHeight = document.documentElement.clientHeight;
        winWidth = document.documentElement.clientWidth;
        document.getElementById("main_div_right").style.height= winHeight - 20 +"px";
        document.getElementById("befor").style.height= winHeight - 80 +"px";
        //document.getElementById("officialDocument").style.height= winHeight - 98 +"px";
    }
    window.onresize=function () {
        autodivheight()
    }
    //内部分发过来公共附件的下载功能
    function clickDownload(e) {
        e.removeAttr('href');
        var url = e.attr('url');
        var file = url.split('ATTACHMENT_NAME=')[1]

        if(file.indexOf('&')>=0){
            file = file.split('&')[1]
            var attUrl = url.split('ATTACHMENT_NAME=')[0]+'ATTACHMENT_NAME=&'+file;
        }else{
            file = ''
            var attUrl = url.split('ATTACHMENT_NAME=')[0]+'ATTACHMENT_NAME=';
        }

        window.open(attUrl);
    };
    $(document).on('click', '.chayue', function () {
        $(this).removeAttr('href');
        var url = $(this).attr('data-url');
        pdurl($.UrlGetRequest('?' + url), url);
    });
    var user = 'senduser';
    var user_id='';
    // var ue = UE.getEditor('container');
    // UEimgfuc();
    autodivheight();
    var res;

    /////////
    $(function () {

        var data={
            "flag":"inbox",
            "page":1,
            "pageSize":10,
            "useFlag":true
        }
        //选人控件
        $("#selectUser").on("click",function(){
            user_id='senduser';
            $.popWindow("../common/selectUser");
        });
//        清除
        $('.clear').click(function () {
            $('#senduser').attr('user_id','');
            $('#senduser').attr('username','');
            $('#senduser').attr('dataid','');
            $('#senduser').attr('userprivname','');
            $('#senduser').val('');
        })
        $('.drafts').on('click','#selectUserO',function(){
            user_id='copeNameText';
            $.popWindow("../common/selectUser");
        })
//        清除
        $('.drafts').on('click','.clearCC',function () {
            $('#copeNameText').attr('user_id','');
            $('#copeNameText').attr('username','');
            $('#copeNameText').attr('dataid','');
            $('#copeNameText').attr('userprivname','');
            $('#copeNameText').val('');
        })
        $('.drafts').on('click','#selectUserT',function(){
            user_id='secritText';
            $.popWindow("../common/selectUser");
        })
        //        清除
        $('.drafts').on('click','.clearBCC',function () {
            $('#secritText').attr('user_id','');
            $('#secritText').attr('username','');
            $('#secritText').attr('dataid','');
            $('#secritText').attr('userprivname','');
            $('#secritText').val('');
        })
        if ($('.main').css('display')=='block'){
            $('.up_format ul li:first-of-type').addClass('for_on').find('img').attr('src','/img/commonTheme/${sessionScope.InterfaceModel}/icon_zuoyou_sel_03.png');

            $('.up_format ul li:first-of-type').siblings().removeClass('for_on');
            $('.up_format ul li:first-of-type').parent().find('li').eq(1).find('img').attr('src','../img/iCon_list_003.png');
        }

        $('.Inbox').click(function(){
            $('.page').find('.div_iframe').remove();
            $('.up_page_right').css('display','block');
        });

        //点击切换外部邮件箱
        $('.externalMail').click(function(){
            $('.page').find('.div_iframeOne').remove();
            $('.up_page_right').css('display','none');
            var Ifrmae='<div class="div_iframeOne" style="width: 82%;overflow-y: hidden;overflow-x: hidden;float: left;height: 100%;"><div id="iframe1" class="iframe1" style="width: 100%;height: 100%;"><iframe name="myFrame" id="iframe_id" src="manageMail" frameborder="0" height="100%" width="100%" noresize="noresize"></iframe></div></div>';
            $('.page').append(Ifrmae);
            $('.div_iframeTwo').css('display','none');
            $('.div_iframe').css('display','none');
            $('#withdraw').css('display','none');
            document.getElementById("iframe_id").onload = function() { //控制子页面的方法
                myFrame.window.showDiv();
            };
        });
        //选中删除
        $('.main_left').on('click','.BTN',function(){
            $(this).addClass("backing").siblings("li").removeClass("backing");
           
            //alert($('.chekEmail').css('display'));
            /*if($('.chekEmail').css('display')=='block'||$('.chekEmail').css('display')=='inline-block'){
                //alert(111)
                var state=$(this).find('.chekEmail').prop("checked");
                //alert(state)
                if(state == true){
                    $(this).find('.chekEmail').prop("checked",true);
                    $(this).addClass("backing");
                }else{
                    $(this).find('.chekEmail').prop("checked",false);
                    $(this).removeClass("backing");
                }
                var child =   $(".chekEmail");
                for(var i=0;i<child.length;i++){
                    var childstate= $(child[i]).prop("checked");
                    if(state!=childstate){
                        return
                    }
                }
            }else {
                $(this).find('.chekEmail').prop("checked",false);
                $(this).addClass("backing").siblings("li").removeClass("backing");
            }*/
        })

        //草稿箱点击立即发送
        $(document).on("click","#btn1",function(){

            var remindVal=0;
            if($('.remindCheck').is(":checked")){
                remindVal=1;
            }
            var smsDefault =1;
            if($('.smsDefault').is(":checked")){
                smsDefault=0;
            }
            var bodyId=$('.main_left .backing').find('input').attr('nId');
            var dataId1=$('.inPole').find('#senduser').attr('user_id');
            var dataId2=$('.tian').find('#copeNameText').attr('user_id');
            var dataId3=$('.mis').find('#secritText').attr('user_id');
            var userId=$('textarea[name="txt"]').attr('user_id');
            //获取输入框内容
            var ue = UE.getEditor('container',{elementPathEnabled : false});
            UEimgfuc();
            var txt = ue.getContentTxt();
            var html = ue.getContent();
            var val=$('#txt').val();
            var attach=$('.Attachment td').eq(1).find('a');
            var aId='';
            var uId='';
            for(var i=0;i<$('.Attachment td .inHidden').length;i++){
                aId += $('.Attachment td .inHidden').eq(i).val();
            }
            for(var i=0;i<$('.Attachment td .inHidden').length;i++){
                uId += $('.Attachment td .inHidden').eq(i).parent(".dech").find("a").eq(0).attr('name');
            }
            if(dataId1 == ''){
                layer.msg('<fmt:message code="email.th.shoujian" />',{ icon:6});
                return;
            }
            if($('.barText').html() != '' && $('.barText').html()!="100%"){
                layer.msg('附件还未上传完毕！',{icon:2});
                return false;
            }
            var data={
                'bodyId':bodyId,
                'sendFlag':0,
                'toId2': dataId1,
                'copyToId':dataId2,
                'secretToId':dataId3,
                'subject':val,
                'content':html,
                'attachmentId':aId,
                'attachmentName':uId,
                'remind':remindVal,//事务提醒
                'smsDefault':smsDefault //手机提醒
            };
            $.ajax({
                type:'post',
                url:'sendEmail',
                dataType:'json',
                data:data,
                success:function(rsp){
                    if(rsp.flag == true){
                        $.layerMsg({content:'<fmt:message code="global.lang.send" />！',icon:1},function(){
                            location.reload();
                        });
                    }else{
                        $.layerMsg({content:'<fmt:message code="global.lang.err" />！',icon:2},function(){
//										console.log(rsp.flag);
                        });
                    }
                }
            });
        })
        //草稿箱点击保存到草稿箱
        $('#btn2').click(function(){
            var bodyId=$('.main_left .backing').find('input').attr('nId');
            var dataId1=$('.inPole').find('#senduser').attr('user_id');
            var dataId2=$('.tian').find('#copeNameText').attr('user_id');
            var dataId3=$('.mis').find('#secritText').attr('user_id');
            var userId=$('textarea[name="txt"]').attr('user_id');
            //获取输入框内容
            var ue = UE.getEditor('container',{elementPathEnabled : false});
            UEimgfuc();
            var txt = ue.getContentTxt();
            var html = ue.getContent();
            var val=$('#txt').val();
            // var attach=$('.Attachment td').eq(1).find('a');
            var aId='';
            var uId='';
            for(var i=0;i<$('.Attachment td .inHidden').length;i++){
                aId += $('.Attachment td .inHidden').eq(i).val();
            }
            for(var i=0;i<$('.Attachment td .inHidden').length;i++){
                uId += $('.Attachment td .inHidden').eq(i).parent(".dech").find("a").eq(0).attr('name');
            }
            if($('.barText').html() != '' && $('.barText').html()!="100%"){
                layer.msg('附件还未上传完毕！',{icon:2});
                return false;
            }
            var data={
                'bodyId':bodyId,
                'toId2': dataId1,
                'copyToId':dataId2,
                'secretToId':dataId3,
                'subject':val,
                'content':html,
                'attachmentId':aId,
                'attachmentName':uId
            };
            $.ajax({
                type:'post',
                url:'saveEmail',
                dataType:'json',
                data:data,
                success:function(){
                    $.layerMsg({content:'<fmt:message code="diary.th.modify" />！',icon:1},function(){
                        location.reload()
                    });
                }
            });
        })

    });
    //从文件柜选择附件上传
    function fileBox() {
        file_id='files_txt';
        model = 'email'
        $.popWindow("../common/selectNewFile?2");
    }

    //附件删除
    $('#files_txt').on('click','.deImgs',function(){
        var data=$(this).parents('.dech').attr('deUrl');
        var dome=$(this).parents('.dech');
        deleteChatment(data,dome);
    })

    //附件删除
    function deleteChatment(data,element){

        layer.confirm('<fmt:message code="workflow.th.que" />？', {
            btn: ['<fmt:message code="global.lang.ok" />','<fmt:message code="depatement.th.quxiao" />'], //按钮
            title:"<fmt:message code="notice.th.DeleteAttachment" />"
        }, function(){
            //确定删除，调接口
            $.ajax({
                type:'get',
                url:'../delete',
                dataType:'json',
                data:data,
                success:function(res){

                    if(res.flag == true){
                        layer.msg('<fmt:message code="workflow.th.delsucess" />', { icon:3});
                        element.remove();
                    }else{
                        layer.msg('<fmt:message code="lang.th.deleSucess" />', { icon:3});
                    }
                }
            });

        }, function(){
            layer.closeAll();
        });
    }

    //ue编辑器清空方法
    function empty(){
        ue.setContent('');
    }

    //正在开发中
    function clicked(){
        layer.msg('<fmt:message code="lang.th.Upcoming" />', {icon: 6});
    }
    $(".a_post").on("click",function(event){
        event.preventDefault();  // 使a自带的方法失效，即无法向addStudent.action发出请求
        $.ajax({
            type: "POST",  // 使用post方式
            url: "addStudent.action",
            contentType:"application/json",
            data: JSON.stringify({param1:value1, param2:value2}),  // 参数列表，stringify()方法用于将JS对象序列化为json字符串
            dataType:"json",
            success: function(result){
                // 请求成功后的操作
            },
            error: function(result){
                // 请求失败后的操作
            }
        });
    });
    //begin 将邮件展开缩起
    //update by cyx at 2021-07-29
	//缩
	function sousuocxx(){
	$(".main_middle").css("left","11%");
	$("#username").css("display","none");
	$("#date").css("display","none");
	$(".xia").css("display","none");
	$("#befor").css("overflow-y","hidden");
	$("#befor").css("white-space","nowrap"); 
	$("#befor").css("overflow","hidden"); 
	$(".main_left").css("width","11%");
	$(".main_div_right").css("width","89%");
	$(".sousuox").css("display","none");
	$(".sousuoy").css("display","")
	}
	//begin 将邮件展开缩起
    //update by cyx at 2021-07-29
	//伸
	function sousuocyx(){
	$(".main_middle").css("left","28%")
	$("#username").css("display","")
	$("#date").css("display","")
	$(".shang").css("display","")
	$(".xia").css("display","")
	$("#befor").css("overflow-y","auto")
	$(".main_left").css("width","28%")
	$(".main_div_right").css("width","72%")
	$(".sousuoy").css("display","none")
	$(".sousuox").css("display","")
	}
	
</script>
<!--
<script type="text/javascript">
    function autodivheight(){
        var winHeight=0;
        if (window.innerHeight)
            winHeight = window.innerHeight;
        else if ((document.body) && (document.body.clientHeight))
            winHeight = document.body.clientHeight;
        if (document.documentElement && document.documentElement.clientHeight)
            winHeight = document.documentElement.clientHeight;
            winWidth = document.documentElement.clientWidth;
        document.getElementById("main_div_right").style.height= winHeight - 7 +"px";
        document.getElementById("befor").style.height= winHeight - 62 +"px";
        //document.getElementById("officialDocument").style.height= winHeight - 98 +"px";
    }
    window.onresize=function () {
        autodivheight()
    }
    //内部分发过来公共附件的下载功能
    function clickDownload(e) {
        e.removeAttr('href');
        var url = e.attr('url');
        var file = url.split('ATTACHMENT_NAME=')[1]

        if(file.indexOf('&')>=0){
            file = file.split('&')[1]
            var attUrl = url.split('ATTACHMENT_NAME=')[0]+'ATTACHMENT_NAME=&'+file;
        }else{
            file = ''
            var attUrl = url.split('ATTACHMENT_NAME=')[0]+'ATTACHMENT_NAME=';
        }

        window.open(attUrl);
    };
    $(document).on('click', '.chayue', function () {
        $(this).removeAttr('href');
        var url = $(this).attr('data-url');
        pdurl($.UrlGetRequest('?' + url), url);
    });
    var user = 'senduser';
    var user_id='';
    // var ue = UE.getEditor('container');
    // UEimgfuc();
    autodivheight();
    var res;
    $(function () {

        var data={
            "flag":"inbox",
            "page":1,
            "pageSize":10,
            "useFlag":true
        }
        //选人控件
        $("#selectUser").on("click",function(){
            user_id='senduser';
            $.popWindow("../common/selectUser");
        });
//        清除
        $('.clear').click(function () {
            $('#senduser').attr('user_id','');
            $('#senduser').attr('username','');
            $('#senduser').attr('dataid','');
            $('#senduser').attr('userprivname','');
            $('#senduser').val('');
        })
        $('.drafts').on('click','#selectUserO',function(){
            user_id='copeNameText';
            $.popWindow("../common/selectUser");
        })
//        清除
        $('.drafts').on('click','.clearCC',function () {
            $('#copeNameText').attr('user_id','');
            $('#copeNameText').attr('username','');
            $('#copeNameText').attr('dataid','');
            $('#copeNameText').attr('userprivname','');
            $('#copeNameText').val('');
        })
        $('.drafts').on('click','#selectUserT',function(){
            user_id='secritText';
            $.popWindow("../common/selectUser");
        })
        //        清除
        $('.drafts').on('click','.clearBCC',function () {
            $('#secritText').attr('user_id','');
            $('#secritText').attr('username','');
            $('#secritText').attr('dataid','');
            $('#secritText').attr('userprivname','');
            $('#secritText').val('');
        })
        if ($('.main').css('display')=='block'){
            $('.up_format ul li:first-of-type').addClass('for_on').find('img').attr('src','/img/commonTheme/${sessionScope.InterfaceModel}/icon_zuoyou_sel_03.png');

            $('.up_format ul li:first-of-type').siblings().removeClass('for_on');
            $('.up_format ul li:first-of-type').parent().find('li').eq(1).find('img').attr('src','../img/iCon_list_003.png');
        }

        $('.Inbox').click(function(){
            $('.page').find('.div_iframe').remove();
            $('.up_page_right').css('display','block');
        });

        //点击切换外部邮件箱
        $('.externalMail').click(function(){
            $('.page').find('.div_iframeOne').remove();
            $('.up_page_right').css('display','none');
            var Ifrmae='<div class="div_iframeOne" style="width: 82%;overflow-y: hidden;overflow-x: hidden;float: left;height: 100%;"><div id="iframe1" class="iframe1" style="width: 100%;height: 100%;"><iframe name="myFrame" id="iframe_id" src="manageMail" frameborder="0" height="100%" width="100%" noresize="noresize"></iframe></div></div>';
            $('.page').append(Ifrmae);
            $('.div_iframeTwo').css('display','none');
            $('.div_iframe').css('display','none');
            $('#withdraw').css('display','none');
            document.getElementById("iframe_id").onload = function() { //控制子页面的方法
                myFrame.window.showDiv();
            };
        });
        //复选框多选点击

        $('.main_left').on('click','.BTN',function(){
            //alert($('.chekEmail').css('display'));
            if($('.chekEmail').css('display')=='block'||$('.chekEmail').css('display')=='inline-block'){
                //alert(111)
                var state=$(this).find('.chekEmail').prop("checked");
                //alert(state)
                if(state == true){
                    $(this).find('.chekEmail').prop("checked",true);
                    $(this).addClass("backing");
                }else{
                    $(this).find('.chekEmail').prop("checked",false);
                    $(this).removeClass("backing");
                }
                var child =   $(".chekEmail");
                for(var i=0;i<child.length;i++){
                    var childstate= $(child[i]).prop("checked");
                    if(state!=childstate){
                        return
                    }
                }
            }else {
                $(this).find('.chekEmail').prop("checked",false);
                $(this).addClass("backing").siblings("li").removeClass("backing");
            }
        })

        //草稿箱点击立即发送
        $('#btn1').click(function(){
            var remindVal=0;
            if($('.remindCheck').is(":checked")){
                remindVal=1;
            }
            var smsDefault =1;
            if($('.smsDefault').is(":checked")){
                smsDefault=0;
            }
            var bodyId=$('.main_left .backing').find('input').attr('nId');
            var dataId1=$('.inPole').find('#senduser').attr('user_id');
            var dataId2=$('.tian').find('#copeNameText').attr('user_id');
            var dataId3=$('.mis').find('#secritText').attr('user_id');
            var userId=$('textarea[name="txt"]').attr('user_id');
            //获取输入框内容
            var ue = UE.getEditor('container',{elementPathEnabled : false});
            UEimgfuc();
            var txt = ue.getContentTxt();
            var html = ue.getContent();
            var val=$('#txt').val();
            var attach=$('.Attachment td').eq(1).find('a');
            var aId='';
            var uId='';
            for(var i=0;i<$('.Attachment td .inHidden').length;i++){
                aId += $('.Attachment td .inHidden').eq(i).val();
            }
            for(var i=0;i<$('.Attachment td .inHidden').length;i++){
                uId += attach.eq(i).attr('NAME');
            }
            if(dataId1 == ''){
                layer.msg('<fmt:message code="email.th.shoujian" />',{ icon:6});
                return;
            }
            if($('.barText').html() != '' && $('.barText').html()!="100%"){
                layer.msg('附件还未上传完毕！',{icon:2});
                return false;
            }
            var data={
                'bodyId':bodyId,
                'sendFlag':0,
                'toId2': dataId1,
                'copyToId':dataId2,
                'secretToId':dataId3,
                'subject':val,
                'content':html,
                'attachmentId':aId,
                'attachmentName':uId,
                'remind':remindVal,//事务提醒
                'smsDefault':smsDefault //手机提醒
            };
            $.ajax({
                type:'post',
                url:'sendEmail',
                dataType:'json',
                data:data,
                success:function(rsp){
                    if(rsp.flag == true){
                        $.layerMsg({content:'<fmt:message code="global.lang.send" />！',icon:1},function(){
                            location.reload();
                        });
                    }else{
                        $.layerMsg({content:'<fmt:message code="global.lang.err" />！',icon:2},function(){
//										console.log(rsp.flag);
                        });
                    }
                }
            });
        })
        //草稿箱点击保存到草稿箱
        $('#btn2').click(function(){
            var bodyId=$('.main_left .backing').find('input').attr('nId');
            var dataId1=$('.inPole').find('#senduser').attr('user_id');
            var dataId2=$('.tian').find('#copeNameText').attr('user_id');
            var dataId3=$('.mis').find('#secritText').attr('user_id');
            var userId=$('textarea[name="txt"]').attr('user_id');
            //获取输入框内容
            var ue = UE.getEditor('container',{elementPathEnabled : false});
            UEimgfuc();
            var txt = ue.getContentTxt();
            var html = ue.getContent();
            var val=$('#txt').val();
            var attach=$('.Attachment td').eq(1).find('a');
            var aId='';
            var uId='';
            for(var i=0;i<$('.Attachment td .inHidden').length;i++){
                aId += $('.Attachment td .inHidden').eq(i).val();
            }
            for(var i=0;i<$('.Attachment td .inHidden').length;i++){
                uId += attach.eq(i).attr('NAME');
            }
            if($('.barText').html() != '' && $('.barText').html()!="100%"){
                layer.msg('附件还未上传完毕！',{icon:2});
                return false;
            }
            var data={
                'bodyId':bodyId,
                'toId2': dataId1,
                'copyToId':dataId2,
                'secretToId':dataId3,
                'subject':val,
                'content':html,
                'attachmentId':aId,
                'attachmentName':uId
            };
            $.ajax({
                type:'post',
                url:'saveEmail',
                dataType:'json',
                data:data,
                success:function(){
                    $.layerMsg({content:'<fmt:message code="diary.th.modify" />！',icon:1},function(){
                        location.reload()
                    });
                }
            });
        })

    });

    //附件删除
    $('#files_txt').on('click','.deImgs',function(){
        var data=$(this).parents('.dech').attr('deUrl');
        var dome=$(this).parents('.dech');
        deleteChatment(data,dome);
    })

    //附件删除
    function deleteChatment(data,element){

        layer.confirm('<fmt:message code="workflow.th.que" />？', {
            btn: ['<fmt:message code="global.lang.ok" />','<fmt:message code="depatement.th.quxiao" />'], //按钮
            title:"<fmt:message code="notice.th.DeleteAttachment" />"
        }, function(){
            //确定删除，调接口
            $.ajax({
                type:'get',
                url:'../delete',
                dataType:'json',
                data:data,
                success:function(res){

                    if(res.flag == true){
                        layer.msg('<fmt:message code="workflow.th.delsucess" />', { icon:6});
                        element.remove();
                    }else{
                        layer.msg('<fmt:message code="lang.th.deleSucess" />', { icon:6});
                    }
                }
            });

        }, function(){
            layer.closeAll();
        });
    }

    //ue编辑器清空方法
    function empty(){
        ue.setContent('');
    }

    //正在开发中
    function clicked(){
        layer.msg('<fmt:message code="lang.th.Upcoming" />', {icon: 6});
    }
    $(".a_post").on("click",function(event){
        event.preventDefault();  // 使a自带的方法失效，即无法向addStudent.action发出请求
        $.ajax({
            type: "POST",  // 使用post方式
            url: "addStudent.action",
            contentType:"application/json",
            data: JSON.stringify({param1:value1, param2:value2}),  // 参数列表，stringify()方法用于将JS对象序列化为json字符串
            dataType:"json",
            success: function(result){
                // 请求成功后的操作
            },
            error: function(result){
                // 请求失败后的操作
            }
        });
    });
</script> -->
<script type="text/javascript" src="../js/spirit/qwebchannel.js"></script>

</html>

